package com.zy.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.mapper.PurMapper;
import com.zy.pojo.Pur;
import com.zy.service.PurService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("rootService")
public class PurServiceImpl extends ServiceImpl<PurMapper, Pur> implements PurService {
    @Resource
    private PurMapper Purmapper;
    @Override
    public List<Pur> RootList() {
        return Purmapper.selectList(null);
    }

    @Override
    public void add(Pur pur) {
        Purmapper.insert(pur);
    }

    @Override
    public void del(Integer id) {
        Purmapper.deleteById(id);
    }

    @Override
    public void updateList(Pur pur) {
        Purmapper.updateById(pur);
    }
}
